package zk.tool.util;

import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;

public class SystemUtil {

    public static void setSystemClipboard(String content) {
        if (StringUtil.isBlank(content)) {
            return;
        }

        Clipboard systemClipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        systemClipboard.setContents(new StringSelection(content.trim()), null);
    }

}
